<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>发票申请</title>
    <link rel="stylesheet" href="${ctx}/static/plug/frozenui-1.3.0/css/frozen.css" media="all">
    <style type="text/css">
       h1{
		font-size: 50px;	       
       }
       button {
		text-align: center;
		background-color: #238CC1;
		color: white;
		margin: 15px 0;
		border: 0;
		width: 100%;
		height: 50px;
		border-radius:6px;	
		}
		.ui-container{
			margin: 0  15px;
		}
    </style>
</head>
<body>
	

<section class="ui-container">
<br>
	<h4 align="center">截止${userInvoiceVo.nowTime }，你可以申请的发票总额为：</h4>
	<h1 align="center">${userInvoiceVo.money/10 }元</h1>
	<c:choose>
  		 <c:when test="${userInvoiceVo.money==null ? 0<200 : userInvoiceVo.money/10<200}">  
    		 <h4 align="center" style="color: red;margin: 15px 0;">发票总额需要达到200元才可在线申领哦！</h4>
  		 </c:when>
  		 <c:otherwise> 
   			<button class="confirm">确认申领</button>
   		</c:otherwise>
	</c:choose>
	<h4 align="center" style="color: gray;">上次申请时间：${userInvoiceVo.lastTime==null ? '无': userInvoiceVo.lastTime}</h4>
	<h4 align="center" style="color: gray;">上次申请金额：${userInvoiceVo.lastMoney/10 }</h4>
</section>

</body>
<script src="${ctx}/static/plug/frozenui-1.3.0/lib/zepto.min.js"></script>
<script src="${ctx}/static/plug/frozenui-1.3.0/js/frozen.js"></script>
<script>
	$(function() {
		var paramObj = {
				"invoiceParams":"${invoiceParam}",
			};
		
		$(".confirm").click(function() {
			window.location.href = "${action}?params="+	paramObj.invoiceParams;
		});
	});
    

</script>
</html>
